.historyList {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    font-size: 1em;
    box-sizing: border-box;
    overflow: hidden; /* Prevent outer container from scrolling */
}

.historyToolbar {
    padding: 10px;
    // background-color: var(--b3-theme-surface-light);
    border-bottom: 1px solid var(--b3-border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.historyItemsContainer {
    flex: 1;
    overflow-y: auto; /* Make this container scrollable */
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.historyGroupHeader {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--b3-theme-on-surface);
    padding: 4px 10px;
    margin-top: 6px;
    margin-bottom: 2px;
    position: sticky;
    top: 0;
    background-color: var(--b3-theme-surface);
    box-shadow: 0 1px 2px 0 var(--b3-border-color);
    z-index: 5;
    // border-bottom: 1px solid var(--b3-border-color);
}

.historyItem {
    background-color: var(--b3-theme-surface-lighter);
    color: var(--b3-theme-on-surface);
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;

    flex-direction: column;
    align-items: flex-start;
}

.historyItem:hover {
    background-color: var(--b3-theme-primary-lighter);
}

.historyTitleLine {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 5px;
}

.historyTitle {
    font-weight: bold;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.historyContent {
    font-size: 0.8em;
    overflow: hidden;
    max-height: 75px;
    color: var(--b3-theme-on-surface-light);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    white-space: pre-line;
}

.historyMetaContainer {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8em;
    color: var(--b3-theme-on-surface-light);
    white-space: nowrap;
}

.historyMetaLabel {
    font-weight: 500;
    color: var(--b3-theme-on-surface-light);
}

.historyMetaVal {
    color: var(--b3-theme-on-surface-light);
    margin-right: 8px;
}

.historyTags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-right: 8px;
}

.historyTag {
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 10px;
    background-color: var(--b3-theme-primary);
    color: var(--b3-theme-on-primary);
    cursor: pointer;
    transition: background-color 0.2s ease;

    &:hover {
        background-color: var(--b3-theme-primary-light);
    }
}